﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class 实验二_2_4_Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        Session.Add("name", "session");
        Session.Timeout = 1;

        HttpCookie cook = new HttpCookie("name");
        cook.Value = "cookieaaa";
        cook.Expires = DateTime.Now.AddMinutes(2);
        Response.Cookies.Add(cook);

        Application.Add("name", "application");

        Response.Redirect("User.aspx?name="+  TextBox1.Text);
    }
}